"""
URL configuration for DjangoProject project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path,re_path,include
from DjangoProject.views import *

urlpatterns = [
       #  第一个参数route:路径搜索地址
       #  第二个参数：映射页的函数名

       #http://127.0.0.1:8000/admin/
       # path("admin/", admin.site.urls),
       # path("hello/",hello_views),
       # path("test/<param>",test_views1,name='test1'),
       # path("test/<str:param>",test_views1,name='test1'),
       # path("test/<int:param>",test_views1,name='test1'),
       # path("test/<slug:param>",test_views1,name="test1"),
       # path("test/<uuid:param>",test_views1,name="test1"),
       # path('test/<path:param>',test_views1,name='test1'),
       # path('test/<name>/<int:age>', test_views2, name='test2'),

       # 匹配包含wahaha的
       # re_path("wahaha",wahaha_views1,name="wahaha"),
       # re_path("^wahaha/$",wahaha_views1,name="wahaha"),
       # re_path(r"^wahaha/(?P<age>\d+)$",wahaha_views2,name="wahaha"),
       # re_path(r"^wahaha/(?P<x>\d{1,2})/(?P<opp>\w+)/(?P<y>\d{1,2})",wahaha_views3,name='wahaha_views3'),
       # re_path(r"^wahaha/(?P<x>\d{3})/(?P<opp>\w+)/(?P<y>\d{3})",wahaha_views4,name="wahaha_views4")

       # 访问路径以bbs开头的都交给bbs应用下的urls.py模块处理
       path("bbs/",include("bbs.urls")),
       path("music/",include("music.urls")),
       path("product/",include("product.urls")),

]
